package com.lzs.bootsafety.business.sys.mapper;

import com.github.pagehelper.Page;
import com.lzs.bootsafety.business.sys.entity.SysPost;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface SysPostMapper {
    /**
     * 获取所有岗位
     * @return
     */
    List<SysPost> selectPostList();

    /**
     * 根据userId查询已有岗位Ids
     * @param userId
     * @return
     */
    List<Long> selectPostIdsByUserId(Long userId);

    /**
     * 分页查询
     * @param sysPost
     * @return
     */
    Page<SysPost> selectPostByPage(SysPost sysPost);

    /**
     * 批量删除
     * @param postIds
     * @return
     */
    int batchDelete(Long[] postIds);

    int insert(SysPost record);

    /**
     * 添加
     * @param record
     * @return
     */
    int insertSelective(SysPost record);

    /**
     * 根据postId查询
     * @param postId
     * @return
     */
    SysPost selectByPrimaryKey(Long postId);

    /**
     * 修改
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(SysPost record);


    int updateByPrimaryKey(SysPost record);
}